Conditions | 3 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | 'use strict' |
||
16 | util.request('kits/short').end(function (response) { |
||
17 | if (response.error || !response.body) { |
||
18 | stopSpinner(response.error) |
||
19 | process.exit() |
||
20 | } |
||
21 | |||
22 | stopSpinner() |
||
23 | var list = response.body.data.sort(function (a, b) { |
||
24 | if (a === 'basic') { |
||
25 | return -1 |
||
26 | } |
||
27 | if (b === 'basic') { |
||
28 | return 1 |
||
29 | } |
||
30 | return a > b ? 1 : -1 |
||
31 | }) |
||
32 | |||
33 | Kits.cache = list |
||
34 | callback(list) |
||
35 | }) |
||
36 | } |
||
39 |